package cn.com.thingo.shyintelligent.model.http.api;

import cn.com.thingo.shyintelligent.model.bean.EzAccessTokenBean;
import cn.com.thingo.shyintelligent.model.bean.EzStatementBean;
import cn.com.thingo.shyintelligent.model.bean.EzSubAccountBean;
import cn.com.thingo.shyintelligent.model.bean.EzSubAccountIdBean;
import io.reactivex.Flowable;
import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface EzApis {
    String HOST = "https://open.ys7.com/api/lapp/";

    @FormUrlEncoded
    @POST("token/get")
    Flowable<EzAccessTokenBean> postEzAccessTokenBean(@Field("appKey") String appKey, @Field("appSecret") String appSecret);

    @FormUrlEncoded
    @POST("ram/account/get")
    Flowable<EzSubAccountBean> postEzSubAccountBean(@Field("accessToken") String accessToken, @Field("accountId") String accountId, @Field("accountName") String accountName);

    @FormUrlEncoded
    @POST("ram/token/get")
    Flowable<EzAccessTokenBean> postEzSubAccessTokenBean(@Field("accessToken") String accessToken, @Field("accountId") String accountId);

    @FormUrlEncoded
    @POST("ram/account/create")
    Flowable<EzSubAccountIdBean> postCreateSubAccount(@Field("accessToken") String accessToken, @Field("accountName") String accountName, @Field("password") String password);

    @FormUrlEncoded
    @POST("ram/statement/add")
    Flowable<EzStatementBean> postAddStatement(@Field("accessToken") String accessToken, @Field("accountId") String accountId, @Field("statement") String statement);

    @FormUrlEncoded
    @POST("ram/statement/delete")
    Flowable<EzStatementBean> postDelStatement(@Field("accessToken") String accessToken, @Field("accountId") String accountId, @Field("deviceSerial") String deviceSerial);
}
